机器学习参数优化
training data,cross variation data, test data(60%,20%,20%)对应有 Jtrain(),JCV(),JTest()
决定假设函数的级数d
决定正则化的参数lamda
plot learning curve to detect bias or variance problem
计算Jtrain(),JCV(),JTest()的时候lamda要设置为0
在画学习曲线的时候,在样本量较小的情况下,可以通过多次随机抽取相等数量的测试用例最后求平均数来减小误差。(比如随机抽取十个样本计算样本量为十时的Jtrain()和JCV(),重复五十次,最后求这五十次的平均数,作为最终的样本量为十的Jtrain()和JCV())
如何入手去分析一个机器学习问题,
在列出了可能提交机器学习结果的方法之后如何选择
error analysis
1、start simple,can implete quickly
2、use learning curve to check correctness
3、manually analysis the error your algrithom make, find most common mistack it make,then try to optimise it and test its error rate to check if improve
4、对于分类问题中,某个分类的占比较小的分类问题,例如所有病人中患癌症的比例,单纯使用error rate来评估算法是不够的,还需要计算算法的precision和recall
5、evaluation algrithom use f score = 2(precisionrecall)/(precision + recall)
概率论
全概率
贝叶斯定理
二项分布
泊松分布
泊松分布可以逼近二项分布